function parCoo() {
    let svg = d3.select("#parallelCoordinate")

    d3.csv("./data/csv/HR_comma_sep.csv").then( originData =>{
        let sl = "satisfaction_level", le = "last_evaluation";
        let plfy = "promotion_last_5years", wa = "Work_accident";

        // 字符数据转化成数字
        originData.forEach(d => {
            d['satisfaction_level']= +(d['satisfaction_level'])
            d['last_evaluation']= +(d['last_evaluation'])
            d['average_montly_hours']= +(d['average_montly_hours'])
            d['time_spend_company']= +(d['time_spend_company'])
            d['Work_accident']= +(d['Work_accident'])
            d['promotion_last_5years']= +(d['promotion_last_5years'])
            d['left']= +(d['left'])
            d['number_project']= +(d['number_project'])
        });

        // 筛选出每条数据中的所需项
        let data = [];
        
        for (let i = 0; i < originData.length; i++) {
            data.push( [originData[i].sales, originData[i].average_montly_hours, originData[i].time_spend_company, originData[i].number_project, originData[i].salary, originData[i].left] )
        }

        // 筛选出满足条件的员工
        let fixedData = [];
        for(let i = 0; i < data.length; i++) {
            if ( originData[i][sl] >= minSatis && originData[i][sl] <= maxSatis && originData[i][le] >= minEvalu && originData[i][le] <= maxEvalu && promotion == -1 && waccident == -1 ) {
                fixedData.push( data[i] )
            } else if ( originData[i][sl] >= minSatis && originData[i][sl] <= maxSatis && originData[i][le] >= minEvalu && originData[i][le] <= maxEvalu && originData[i][plfy] == promotion && waccident == -1 ) {
                fixedData.push( data[i] )
            } else if ( originData[i][sl] >= minSatis && originData[i][sl] <= maxSatis && originData[i][le] >= minEvalu && originData[i][le] <= maxEvalu && promotion == -1 && originData[i][wa] == waccident ) {
                fixedData.push( data[i] )
            } else if ( originData[i][sl] >= minSatis && originData[i][sl] <= maxSatis && originData[i][le] >= minEvalu && originData[i][le] <= maxEvalu && originData[i][plfy] == promotion && originData[i][wa] == waccident ) {
                fixedData.push( data[i] )
            }
        }

        // 选出部分所需量以定义比例尺
        let tpmData = [], tsData = [], jpData = [];
        for( let i = 0; i < fixedData.length; i++ ) {
            tpmData.push( fixedData[i][1])
            tsData.push( fixedData[i][2])
            jpData.push( fixedData[i][3])
        }
        // console.log( fixedData )

        // 定义一些所需量
        let conf = {
            x : 75,
            y :40,
            h : 230,
            step : 126,
            position : ['accounting', 'hr', 'IT', 'management', 'marketing', 'product_mng', 'RandD', 'sales', 'support', 'technical'], 
            salary : ['low', 'medium', 'high'],
        }
        let fix = [conf.h/20+50, 50, 50, 50, conf.h/6+50]
        let info = [['工作岗位', 4], ['月均工作时间（小时）', 10], ['工作时长（年）', 7], ['参与项目数量（个）', 9], ['薪资水平', 4]]
        
        // 轴顺序：工作岗位、月均工作时间、工作时长、参与项目数量、薪资水平
        
        // 比例尺数组
        let genScale = []

        // 月均工作时间 比例尺
        let tpmScale = d3.scaleLinear()
            .domain( [Math.min.apply(null, tpmData), Math.max.apply(null, tpmData)] )
            .range( [conf.h, 0] )
        // 工作时长 比例尺
        let tsScale = d3.scaleLinear()
            .domain( [Math.min.apply(null, tsData), Math.max.apply(null, tsData)] )
            .range( [conf.h, 0] )
        // 参与项目数量 比例尺
        let jpScale = d3.scaleLinear()
            .domain( [Math.min.apply(null, jpData), Math.max.apply(null, jpData)] )
            .range( [conf.h, 0] )
        // 工作岗位 比例尺
        let wpScale = d3.scaleBand()
            .domain(conf.position)
            .range( [conf.h, 0] )
        // 薪资水平 比例尺
        let slScale = d3.scaleBand()
            .domain(conf.salary)
            .range( [conf.h, 0] )
        
        // 轴顺序：工作岗位、月均工作时间、工作时长、参与项目数量、薪资水平
        genScale.push(wpScale)
        genScale.push(tpmScale)
        genScale.push(tsScale)
        genScale.push(jpScale)
        genScale.push(slScale)
        // console.log(genScale)
        
        // 清空画布
        svg.selectAll( "*" )
        .remove()

        // 画轴
        for(let i = 0; i < 5 ; i++ ) {
            let axis = d3.axisLeft()
                .scale( genScale[i] )
            svg.append('g')
                .attr( "transform", `translate( ${ conf.x + conf.step * i }, ${ conf.y } )` )
                .call(axis)
                .attr( "color", "aqua" )
                .attr( 'opacity', 0.9 )
            svg.append( "text" )
                .text( info[i][0] )
                .attr( "fill", "aqua" )
                .attr( "font-size", 10 )
                .attr( "transform", `translate( ${ conf.x + conf.step * i - info[i][1] * 5 }, ${ conf.y + conf.h + 15 } )` )
                .attr( 'opacity', 0.9 )
        }

        // 透明度比例尺
        opScale = d3.scaleLinear()
            .domain( [0, 3000] )
            .range( [0.5, 0.05] )

        // 画线
        let linePath = d3.line()
        let g = svg.append( 'g' )
        if ( tableData.length == 0 ) {
            for( let i = 0; i < fixedData.length; i++ ) {
                let line = [];
                for( let j = 0; j < 5; j++ ) {
                    line.push( [conf.x + j * conf.step, conf.y + conf.h - ( 280 - genScale[j]( fixedData[i][j] ) ) + fix[j]] )
                }
                g.append( 'path' )
                    .attr( 'd', linePath( line ) )
                    .attr( 'stroke', function() {
                        if (fixedData[i][5] == 0) {
                            return Color[0];
                        } else {
                            return Color[1];
                        }
                    })
                    .attr( 'stroke-width',0 )
                    .attr( 'fill', 'none' )
                    .attr( 'opacity', 1 )
                    .transition()
                    .duration( 1500 )
                    .attr( 'opacity', function(){
                        if ( fixedData.length<=3000 &&  fixedData.length > 50 ) {
                            return opScale( fixedData.length ) 
                        } else if ( fixedData.length <= 50 ) {
                            return 1
                        } else {
                            return 0.05
                        }
                    })
                    .attr( 'stroke-width', 0.5 )
                    // console.log( line )
            }
        } else {
            for( let i = 0; i < tableData.length; i++ ) {
                let line = [];
                for( let j = 0; j < 5; j++ ) {
                    line.push( [conf.x + j * conf.step, conf.y + conf.h - ( 280 - genScale[j]( data[tableData[i]][j] ) ) + fix[j]] )
                }
                g.append( 'path' )
                    .attr( 'd', linePath( line ) )
                    .attr( 'stroke', function() {
                        if ( data[tableData[i]][5] == 0 ) {
                            return Color[0];
                        } else {
                            return Color[1];
                        }
                    })
                    .attr( 'stroke-width',0 )
                    .attr( 'fill', 'none' )
                    .attr( 'opacity', 1 )
                    .transition()
                    .duration( 1500 )
                    .attr( 'opacity', function(){
                        if ( tableData.length<=3000 &&  tableData.length > 50 ) {
                            return opScale( tableData.length ) 
                        } else if ( tableData.length <= 50 ) {
                            // console.log(1)
                            return 1
                        } else {
                            console.log(0.05)
                            return 0.05
                        }
                    })
                    .attr( 'stroke-width', 0.5 )
            }
        }
        // 表头
        // svg.append( "text" )
        //     .text( "职工数据平行坐标图" )
        //     .attr( "font-weight", "bold" )
        //     .attr( "font-size", 20 )
        //     .attr( "fill", "aqua" )
        //     .attr( "transform", "translate( 180, 25 )" )

        // 画图例
        g = svg.append( 'g' )
        for( let i =0;i < 2; i++ ) {
            g.append( "rect" )
                .attr( "width", 30 )
                .attr( "height", 15 )
                .attr( "fill", function() {
                    if ( i == 0 ) {
                        return Color[0];
                    } else {
                        return Color[1];
                    }
                })
                .attr( "transform", `translate( ${ 380 + i * 120 }, 10 )` )
            g.append( "text" )
                .text( function() {
                    if ( i == 0 ) {
                        return "未离职人员"
                    } else {
                        return "离职人员"
                    }
                })
                .attr( "font-size", 15)
                .attr( "fill", "#FFFFFF" )
                .attr( "transform", `translate( ${ 415 + i * 120 }, 23 )` )
        }
    })
}